/**
 * Created by linxiao on 17/8/4.
 */
function userList(){
    var _this = this;
}
userList.prototype.init = function(){
    var _this = this;

}
userList.prototype.initGroupTree = function(){
    var _this = this;
    var setting = {
        async: {
            enable: true,
            url:"../asyncData/getNodes.php",
            autoParam:["id", "name=n", "level=lv"],
            otherParam:{"otherParam":"zTreeAsyncTest"},
            dataFilter: filter
        }
    };

    function filter(treeId, parentNode, childNodes) {
        if (!childNodes) return null;
        for (var i=0, l=childNodes.length; i<l; i++) {
            childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
        }
        return childNodes;
    }

    $(document).ready(function(){
        $.fn.zTree.init($("#treeDemo"), setting);
    });
}